#ifndef RESOURCE_H
#define RESOURCE_H

namespace Cvekas {

typedef uint ResourceId;

/// Base class for all resources managed by the engine
class Resource : public boost::noncopyable
{
public:

	/// Constructor
	/// \param name Resource name
	/// \param id Identification number unique to this resource
	Resource(const std::string& name, ResourceId id) 
		: name(name), is_ready(false), id(id)
	{
	}
	
	/// Destructor
	virtual ~Resource() {};
	
	/// Gets resource name
	const std::string& getName() const { return name; };
	
	/// Gets resource ID
	ResourceId getId() const { return id; };
	
	/// Is resource ready for usage ?
	bool isReady() const { return is_ready; };
	
	/// Value for invalid ResourceIds
	static const ResourceId INVALID_ID = 0xFFFFFFFF;

protected:
    const std::string name;
    const ResourceId id;
    bool is_ready;
};

typedef boost::shared_ptr<Resource> ResourcePtr;

} // namespace

#endif